package github.sf.fw.tools.tree;

/**
 * 依据BuildType创建对应的TreeBuilder
 * <pre>
 *     void treeBuilder() {
 *         TreeBuilderProvider provider = new DefaultTreeBuilderProvider();
 *         TreeBuilder treeBuilder = provider.getTreeBuilder(BuildType.RECURSION);
 *         treeBuilder.setTreeNodeImpl("TTNode");
 *         Node node = treeBuilder.buildTree(listNode());
 *         Gson gson = new GsonBuilder().setPrettyPrinting().create();
 *         System.out.println(gson.toJson(node));
 *      }
 * </pre>
 *
 * @see TreeBuilder
 */
public interface TreeBuilderProvider {
    TreeBuilder getTreeBuilder(BuildType type);
}
